﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.trade.ti_pingfen.*" %>

<%
	Ti_pingfenInfo pingfenInfo = new Ti_pingfenInfo();
	Map pingfenMap =  new Hashtable();
	String info_id="";
	if(request.getParameter("info_id")!=null && !request.getParameter("info_id").equals("")){
		info_id = request.getParameter("info_id");
		pingfenMap.put("info_id",info_id);
	}
	String rating="";
	if(request.getParameter("rating")!=null && !request.getParameter("rating").equals("")){
		rating = request.getParameter("rating");
		pingfenMap.put("num",rating);
	}	
	String ip_addr = request.getRemoteAddr();
	pingfenMap.put("ip",ip_addr);
	
	boolean is_success = true;
	if(!rating.equals("")){
		 is_success = pingfenInfo.insertFront(pingfenMap);
	}
	
	int count = pingfenInfo.getCountByObj(pingfenMap);
	int total_rating = pingfenInfo.getTotalRating(pingfenMap);

%>
<span id="is_success"><%=is_success%></span>
<span id="count_hidden"><%=count%></span>
<span id="total_rating_hidden"><%=total_rating%></span>
